package person.wend.springbootlearnexample.config;

import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;
import person.wend.springbootlearnexample.controller.JerseyController;
import person.wend.springbootlearnexample.controller.UserJerseyController;
import person.wend.springbootlearnexample.filter.LoggingFilter;
import person.wend.springbootlearnexample.filter.LoggingInterceptor;

@Component
public class MyJerseyConfig extends ResourceConfig {
    public MyJerseyConfig() {
        register(JerseyController.class);
        register(UserJerseyController.class);
        // 注册过滤器
        register(LoggingFilter.class);

        // 注册拦截器
        register(LoggingInterceptor.class);
    }
}
